
let lastEvent;
['click','pointerdown', 'touchstart', 'mousedown', 'keydown', 'mouseover'].forEach(eventType=>{
    document.addEventListener(eventType,(event)=>{
        lastEvent = event
    },{
        capture:true, //capture 控制监听器是在捕获阶段执行还是在冒泡阶段执行 
        passive:true //passive 的意思是顺从的，默认不阻止默认事件
    })
})
export default function () {
    return lastEvent;
};